package com.atguigu.daijia.dispatch.client;

import com.atguigu.daijia.common.result.Result;
import com.atguigu.daijia.model.vo.dispatch.NewOrderTaskVo;
import com.atguigu.daijia.model.vo.order.NewOrderDataVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;


@FeignClient(value = "service-dispatch")
public interface NewOrderFeignClient {
    @PostMapping("/dispatch/newOrder/addAndStartTask")
    Result<Long> addAndStartTask(NewOrderTaskVo newOrderTaskVo);

    @GetMapping("/dispatch/newOrder/findNewOrderQueueDate/{driverId}")
    public Result<List<NewOrderDataVo>> findNewOrderQueueDate(@PathVariable Long driverId);

    @GetMapping("/dispatch/newOrder/clearNewOrderQueueData/{driverId}")
    public Result<Boolean> clearNewOrderQueueData(@PathVariable Long driverId);

}